package com.newcapec.modules.health.controller;

import com.newcapec.common.utils.PageUtils;
import com.newcapec.common.utils.R;
import com.newcapec.modules.health.service.HealthRecordService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 
 *
 * @author fujun
 * @email fujun@newcapec.com
 * @date 2021-12-24 10:52:28
 */
@RestController
@RequestMapping("health/healthrecord")
public class HealthRecordController {
    @Autowired
    private HealthRecordService healthRecordService;

    /**
     * 列表
     */
    @GetMapping("/list")
    @RequiresPermissions("health:healthrecord:list")
    public R list(@RequestParam Map<String, Object> params) {
        PageUtils page = healthRecordService.queryPage(params);

        return R.ok().put("page", page);
    }
}
